package com.hrg.rds.biz.station.controller;

import com.hrg.rds.biz.station.domain.Segment;
import com.hrg.rds.biz.station.service.SegmentService;
import com.hrg.sys.framework.web.controller.BaseController;
import com.hrg.sys.framework.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
@RequestMapping("/open/segment")
public class SegmentController extends BaseController {
    @Autowired
    private SegmentService segmentService;

    @GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
    public @ResponseBody AjaxResult list() {
        List<Segment> segmentList = segmentService.selectList();
        return success(segmentList);
    }
}
